<template>
	<view>
		<v-button @click="show = true">打开</v-button>
		<v-picker-list v-model:value="show" :list="options" title="选择水果" :scroll-height="400" @confirm="confirm" @select="select"></v-picker-list>
	</view>
</template>

<script setup>
import { ref } from 'vue';
let show = ref(false);
const options = [
	{ label: '西瓜', value: 1 },
	{ label: '橙子', value: 2 },
	{ label: '橘子', value: 3 },
	{ label: '草莓', value: 4 },
	{ label: '苹果', value: 5 },
	{ label: '香蕉', value: 6 },
	{ label: '哈密瓜', value: 7 }
];
//选中事件
const confirm = (value) => {
	console.log(value);
};
//选择事件
const select = (value) => {
	console.log(value);
};
</script>

<style></style>
